﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Task5
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void butAdd_Click(object sender, EventArgs e)
        {
            string gameInfo = "新游戏\n";
            gameInfo+="游戏名称："+txtText1.Text+"\n";
            gameInfo+="游戏类别"+cobType.Text+"\n";
            //从RadioButton中获取游戏状态
            string state = "";
            if (rdbStaeing.Checked)
            {
                state = rdbStaeing.Text;
            }else if (rdbTexting.Checked)
            {
                state = rdbTexting.Text;
            }
            else
            {
                state = rdbWin.Text;
            }
            gameInfo+="游戏状态"+state+"\n";
            //从CheckBox中获取游戏特色
            string tags = "";
            if (chbSHA.Checked)
            {
                tags += chbSHA.Text + ",";
            }
            if (chbSheji.Checked)
            {
                tags += chbSheji.Text + ",";
            }
            if (chbtecknology.Checked)
            {
                tags += chbtecknology.Text + ",";
            }
            if (chbWord.Checked)
            {
                tags += chbWord.Text + ",";
            }
            if (chbType.Checked)
            {
                tags += chbType.Text + ",";
            }
            gameInfo+="游戏特色："+tags+"\n";
            MessageBox.Show(gameInfo);
        }

        private void butQuxiao_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}
